<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>会员积分管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/wechat/memberScore/">会员积分列表</a></li>
		<shiro:hasPermission name="wechat:memberScore:edit"><li><a href="${ctx}/wechat/memberScore/form">会员积分添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="memberScore" action="${ctx}/wechat/memberScore/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>姓名 ：</label><form:input path="wechatMember.name" htmlEscape="false" maxlength="50" class="input-medium"/>
		<label>手机号 ：</label><form:input path="wechatMember.mobile" htmlEscape="false" maxlength="50" class="input-medium"/>
		<label class="control-label" style="margin-top:3px;">开始时间:</label>
				
					<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
					<input id="createTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${memberScore.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>  
<label class="control-label" style="margin-top:3px;">结束时间:</label>
					<input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${memberScore.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
		<br><br>
		<label>积分 ：</label><form:input path="score" htmlEscape="false" maxlength="50" class="input-medium"/>
		
		
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr>
		<shiro:hasPermission name="sys:user:edit"><th>商家</th></shiro:hasPermission>
		<th>姓名</th>
		<th>手机号</th><th>积分</th><th>时间</th><th>说明</th><shiro:hasPermission name="wechat:memberScore:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="memberScore">
			<tr>
				<shiro:hasPermission name="sys:user:edit"><td>${memberScore.user.name }</td></shiro:hasPermission>
				<td> ${memberScore.wechatMember.name} </td>
				<td>${memberScore.wechatMember.mobile}</td>
				<td>${memberScore.score}</td>
				<td>${memberScore.createTime}</td>
				<td>${memberScore.remarks}</td>
				<shiro:hasPermission name="wechat:memberScore:edit"><td>
    				<a href="${ctx}/wechat/memberScore/form?id=${memberScore.id}">修改</a>
					<a href="${ctx}/wechat/memberScore/delete?id=${memberScore.id}" onclick="return confirmx('确认要删除该会员积分吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
